# class Person(object):
#
#     def __init__(self, name, age):
#         print("__init__方法执行")
#         self.name = name
#         self.age = age
#
#     def __str__(self):
#         print("__str__执行")
#         return "hello world"
#
#     # def __str__(self):
#     #     return self.name
#
# yuan = Person("yuan", 23)
# # print(yuan)
# print(str(yuan))
#
# print(yuan)
# class Person(object):
#     def __init__(self, name, age):
#         print("__init__方法执行")
#         self.name = name
#         self.age = age
#
#     def __eq__(self, other):
#         return self.name == other.name and self.age == other.age
#
# yuan = Person("yuan", 23)
#
# alex = Person("alex", 23)
#
# # print(alex == 2)
# # print( 2 == alex)
# print(yuan == alex)
